/*import './assets/main.css'*/

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// 全局导入基础样式和脚本
import '@/assets/vendors/feather/feather.css';
import '@/assets/vendors/mdi/css/materialdesignicons.min.css';
import '@/assets/vendors/ti-icons/css/themify-icons.css';
import '@/assets/vendors/typicons/typicons.css';
import '@/assets/vendors/simple-line-icons/css/simple-line-icons.css';
import '@/assets/vendors/css/vendor-bundle-base.css';
import '@/utils/css/vertical-layout-light/style.css';

// 预加载关键脚本
import '@/assets/vendors/js/vendor-bundle-base.js';
import '@/utils/js/off-canvas.js';
import '@/utils/js/hoverable-collapse.js';
import '@/utils/js/template.js';

// 创建应用实例
const app = createApp(App)

// 注册全局属性
app.config.globalProperties.$bootstrap = window.bootstrap

// 使用路由
app.use(router)

// 全局错误处理
app.config.errorHandler = (err, vm, info) => {
  console.error('Vue错误:', err)
  console.info('错误发生在:', info)
}

// 挂载应用
app.mount('#app')

// 确保脚本在挂载后可用
document.addEventListener('DOMContentLoaded', () => {
  console.log('DOM完全加载，确保所有脚本都已初始化')
})
